--- /dev/null
- d4a257411a7c23c2ed75c3e163243fd0e92dc2be
- d4a257411a7c23c2ed75c3e163243fd0e92dc2be
+# see git-dpm(1) from git-dpm package
++f07b5081dc17404b73acfc9da576d9746d276b7a
++f07b5081dc17404b73acfc9da576d9746d276b7a
+62bc68f777c532a970566625e315d68bf0ab4eee
+62bc68f777c532a970566625e315d68bf0ab4eee
+emacs24_24.5+1.orig.tar.bz2
+790a17cf600831dd5c36afddb9cb48bc5482e6c9
+24401779
--- /dev/null
--- /dev/null
++From f07b5081dc17404b73acfc9da576d9746d276b7a Mon Sep 17 00:00:00 2001
++From: Wolfgang Jenkner <wjenkner@inode.at>
++Date: Sat, 26 Dec 2015 12:12:02 -0800
++Subject: Emacs should work with gcc 5.2 and newer
++
++This patch, backported from upstream by Aurelien Jarno
++<aurel32@debian.org>, has been added:
++
++ Always define gmalloc etc. in src/gmalloc.c
++
++ This is a work-around to prevent the compiler from using semantic
++ knowledge about malloc for optimization purposes. E.g., gcc 5.2
++ with -O2 replaces most of calloc's definition by a call to calloc;
++ see Bug#22085.
++ * src/gmalloc.c [!HYBRID_MALLOC] (malloc, realloc, calloc)
++ (aligned_alloc, free): Do not undef. Instead, define these as
++ functions (perhaps renamed to gmalloc etc.) in terms of gmalloc etc.
++
++Origin: backport, commit: 4b1436b702d56eedd27a0777fc7232cdfb7ac4f6
++Bug-Debian: http://bugs.debian.org/833727
++Added-by: Rob Browning <rlb@defaultvalue.org>
++---
++ src/gmalloc.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
++ 1 file changed, 47 insertions(+)
++
++diff --git a/src/gmalloc.c b/src/gmalloc.c
++index cfd39be..9f93b62 100644
++--- a/src/gmalloc.c
+++++ b/src/gmalloc.c
++@@ -49,6 +49,17 @@ extern "C"
++
++ #include <stddef.h>
++
+++#undef malloc
+++#undef realloc
+++#undef calloc
+++#undef aligned_alloc
+++#undef free
+++#define malloc gmalloc
+++#define realloc grealloc
+++#define calloc gcalloc
+++#define aligned_alloc galigned_alloc
+++#define free gfree
+++#define malloc_info gmalloc_info
++
++ /* Allocate SIZE bytes of memory. */
++ extern void *malloc (size_t size);
++@@ -1747,6 +1758,42 @@ valloc (size_t size)
++ return aligned_alloc (pagesize, size);
++ }
++
+++#undef malloc
+++#undef realloc
+++#undef calloc
+++#undef aligned_alloc
+++#undef free
+++
+++void *
+++malloc (size_t size)
+++{
+++ return gmalloc (size);
+++}
+++
+++void *
+++calloc (size_t nmemb, size_t size)
+++{
+++ return gcalloc (nmemb, size);
+++}
+++
+++void
+++free (void *ptr)
+++{
+++ gfree (ptr);
+++}
+++
+++void *
+++aligned_alloc (size_t alignment, size_t size)
+++{
+++ return galigned_alloc (alignment, size);
+++}
+++
+++void *
+++realloc (void *ptr, size_t size)
+++{
+++ return grealloc (ptr, size);
+++}
+++
++ #ifdef GC_MCHECK
++
++ /* Standard debugging hooks for `malloc'.
--- /dev/null
+0001-Prefer-usr-share-info-emacs-24-over-usr-share-info.patch
+0002-Run-debian-startup-and-set-debian-emacs-flavor.patch
+0003-Remove-files-that-appear-to-be-incompatible-with-the.patch
+0004-Adjust-documentation-references-for-Debian.patch
+0005-Modify-the-output-of-version-to-indicate-Debian-modi.patch
+0006-Look-for-NEWS-in-order-to-find-etc-rather-than-GNU.patch
+0007-Don-t-try-to-build-src-macuvs.h-via-IVD_Sequences.tx.patch
+0008-Emacs-won-t-assume-grep-supports-GREP_OPTIONS.patch
+0009-Emacs-should-no-longer-hang-during-large-yanks.patch
+0010-ELF-unexec-Correct-section-header-index.patch
+0011-ELF-unexec-Tidy-code.patch
+0012-ELF-unexec-Merge-Alpha-and-MIPS-COFF-debug-handling.patch
+0013-ELF-unexec-Symbol-table-patching.patch
+0014-ELF-unexec-_OBJC_-symbols-in-bss-sections.patch
+0015-ELF-unexec-R_-_NONE-relocs.patch
+0016-ELF-unexec-Drive-from-PT_LOAD-header-rather-than-sec.patch
+0017-ELF-unexec-Don-t-insert-a-new-section.patch
+0018-src-unexelf.c-NEW_PROGRAM_H-Remove-unused-macro-Bug-.patch
+0019-ELF-unexec-align-section-header.patch
+0020-Emacs-should-show-GTK-icons-again.patch
++0021-Emacs-should-work-with-gcc-5.2-and-newer.patch